package com.vhall.component.controller.data.facade;

import com.vhall.component.entity.account.dto.IndexDto;
import com.vhall.component.entity.data.vo.*;
import com.vhall.component.entity.interactive.vo.DataMarketBaseReqVo;
import com.vhall.component.entity.interactive.vo.QaExportReqVo;
import com.vhall.component.plugin.common.annotation.TokenAuth;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;

import java.io.IOException;
import java.util.HashMap;

/**
 * @author guoxin.wang
 * @date 2021-06-18 13:37
 */
@FeignClient(value = "DataAdminFacade", path = "/v4/datacenter/admin/stat")
public interface DataAdminFacade {

    /**
     * 统计-房间
     *
     * @param reqVO
     * @return
     */
    @TokenAuth
    @GetMapping(value = "/live")
    AdminLiveRspVO live(@Validated AdminLiveReqVO reqVO);

    /**
     * admin统计台数据接口
     *
     * @return
     */
    @TokenAuth
    @GetMapping(value = "/index")
    HashMap<String, IndexDto> index();

    /**
     * 异步导出列表
     *
     * @param reqVO
     * @return
     */
    @TokenAuth
    @PostMapping(value = "/export-list")
    ExportListRspVO exportList(@Validated DataExportAdminParamVO reqVO);

    /**
     * 导出pv信息
     *
     * @param reqVO
     * @return
     */
    @PostMapping(value = "/export-pv")
    String exportPvAction(@Validated DataExportAdminParamVO reqVO);

    /**
     * 导出聊天信息
     *
     * @param reqVO
     * @return
     */
    @PostMapping(value = "/export-message")
    Boolean exportMessage(@Validated ExportMessageReqVO reqVO);

    /**
     * 导出问答信息
     *
     * @param reqVO
     * @return
     */
    @PostMapping(value = "/export-qa")
    Boolean exportQa(@Validated QaExportReqVo reqVO);

    /**
     * 导出==数据大盘，直接导出
     */
    @TokenAuth
    @PostMapping(value = "/export-dataMarket")
    void exportDataMarket(@Validated DataMarketBaseReqVo reqVO) throws IOException;

}
